<?php
/* @var $this SiteController */
/* @var $model LoginForm */
/* @var $form CActiveForm  */

$this->pageTitle=Yii::app()->name . ' - Login';
?>

<div class="row-fluid">
	<div class="span8 offset2">
		<form class="form-horizontal well" id="LoginForm" action="<?php echo Yii::app()->getUrlManager()->createUrl('site/login'); ?>" method="post">
			<fieldset>
				<legend>用户登录</legend>
				<div class="control-group" id="LoginForm_email_ctrlgrp">
					<label id="LoginForm_email_lbl" for="LoginForm_email" class="control-label">电子邮箱</label>
					<div class="controls">
						<input id="LoginForm_email" name="LoginForm[email]" type="email" placeholder="电子邮箱" required data-validate-type="required ajax">
						<span id="LoginForm_email_help"class="help-inline"></span>
					</div>
				</div>
				<div class="control-group" id="LoginForm_password_ctrlgrp">
					<label id="LoginForm_password_lbl" for="LoginForm_password" class="control-label">密码</label>
					<div class="controls">
						<input id="LoginForm_password" name="LoginForm[password]" type="password" placeholder="密码" required data-validate-type="required ajax">
						<span id="LoginForm_password_help" class="help-inline"></span>
					</div>
				</div>
				<div class="control-group"  id="LoginForm_rememberMe_ctrlgrp">
					<div class="controls">
						<label class="checkbox">
							<input id="LoginForm_rememberMe" name="LoginForm[rememberMe]" type="checkbox" checked >
							<span>两周内不用再次登录</span>
						</label>
					</div>
				</div>
				<div class="form-actions">
					<input type="submit" value="登录" class="btn btn-primary">
					<input type="button" value="取消" class="btn" onclick="javascript:history.go(-1);">
					<input type="button" value="测试" class="btn" data-itemtype="test">
				</div>
			</fieldset>
		</form>
	</div>

<?php /*
<div class="form-horizontal">
<?php $form=$this->beginWidget('ext.momill.widgets.MActiveForm', array(
	'id'=>'login-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

	<div class="control-group">
		<?php 
		echo $form->labelEx($model,'电子邮箱',array('class'=>'control-label'));
		echo '<div class="controls">';
		echo $form->emailField($model,'username');
		echo $form->error($model,'username');
		echo '</div>';
		?>
	</div>

	<div class="control-group">
		<?php 
		echo $form->labelEx($model,'密码',array('class'=>'control-label'));
		echo '<div class="controls">';
		echo $form->passwordField($model,'password');
		echo $form->error($model,'password');
		echo '</div>';
		?>
	</div>

	<div class="control-group">
		<?php 
		echo '<div class="controls">';
		echo $form->checkBox($model,'rememberMe');
		echo $form->label($model,'rememberMe');
		echo $form->error($model,'rememberMe');
		echo '</div>';
		?>
	</div>

	<div class="form-actions">
		<?php echo CHtml::submitButton('Login',array('class'=>'btn btn-primary')); ?>
	</div>

<?php $this->endWidget(); ?>
</div>
*/ ?>

</div>